using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Kitware.mummy.Runtime;

namespace Kitware.VTK;

/// <summary>
///    vtkSMPContourGrid
/// </summary>
/// <remarks>
///    a subclass of vtkContourGrid that works in parallel
/// vtkSMPContourGrid performs the same functionaliy as vtkContourGrid but does
/// it using multiple threads. This will probably be merged with vtkContourGrid
/// in the future.
/// </remarks>
public class vtkSMPContourGrid : vtkContourGrid
{
	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new const string MRFullTypeName = "Kitware.VTK.vtkSMPContourGrid";

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new static readonly string MRClassNameKey;

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	static vtkSMPContourGrid()
	{
		MRClassNameKey = "class vtkSMPContourGrid";
		Methods.RegisterType(Assembly.GetExecutingAssembly(), MRClassNameKey, Type.GetType("Kitware.VTK.vtkSMPContourGrid"));
	}

	/// <summary>
	/// Automatically generated constructor - called from generated code.
	/// DO NOT call directly.
	/// </summary>
	public vtkSMPContourGrid(IntPtr rawCppThis, bool callDisposalMethod, bool strong)
		: base(rawCppThis, callDisposalMethod, strong)
	{
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkSMPContourGrid_New(ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Constructor.
	/// </summary>
	public new static vtkSMPContourGrid New()
	{
		vtkSMPContourGrid result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkSMPContourGrid_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkSMPContourGrid)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	/// <summary>
	/// Constructor.
	/// </summary>
	public vtkSMPContourGrid()
		: base(IntPtr.Zero, callDisposalMethod: false, strong: false)
	{
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr rawCppThis = vtkSMPContourGrid_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		SetCppThis(rawCppThis, callDisposalMethod: true, (mteStatus != 0 && rawRefCount >= 2) ? true : false);
	}

	/// <summary>
	/// Automatically generated protected Dispose method - called from
	/// public Dispose or the C# destructor. DO NOT call directly.
	/// </summary>
	protected override void Dispose(bool disposing)
	{
		base.Dispose(disposing);
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern byte vtkSMPContourGrid_GetMergePieces_01(HandleRef pThis);

	/// <summary>
	/// If MergePieces is true (default), this filter will merge all
	/// pieces generated by processing the input with multiple threads.
	/// The output will be a vtkPolyData. Note that this has a slight overhead
	/// which becomes more significant as the number of threads used grows.
	/// If MergePieces is false, this filter will generate a vtkMultiBlock
	/// of vtkPolyData where the number of pieces will be equal to the number
	/// of threads used.
	/// </summary>
	public virtual bool GetMergePieces()
	{
		return (vtkSMPContourGrid_GetMergePieces_01(GetCppThis()) != 0) ? true : false;
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkSMPContourGrid_GetNumberOfGenerationsFromBase_02(HandleRef pThis, string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public override long GetNumberOfGenerationsFromBase(string type)
	{
		return vtkSMPContourGrid_GetNumberOfGenerationsFromBase_02(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkSMPContourGrid_GetNumberOfGenerationsFromBaseType_03(string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static long GetNumberOfGenerationsFromBaseType(string type)
	{
		return vtkSMPContourGrid_GetNumberOfGenerationsFromBaseType_03(type);
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkSMPContourGrid_IsA_04(HandleRef pThis, string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public override int IsA(string type)
	{
		return vtkSMPContourGrid_IsA_04(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkSMPContourGrid_IsTypeOf_05(string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static int IsTypeOf(string type)
	{
		return vtkSMPContourGrid_IsTypeOf_05(type);
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkSMPContourGrid_MergePiecesOff_06(HandleRef pThis);

	/// <summary>
	/// If MergePieces is true (default), this filter will merge all
	/// pieces generated by processing the input with multiple threads.
	/// The output will be a vtkPolyData. Note that this has a slight overhead
	/// which becomes more significant as the number of threads used grows.
	/// If MergePieces is false, this filter will generate a vtkMultiBlock
	/// of vtkPolyData where the number of pieces will be equal to the number
	/// of threads used.
	/// </summary>
	public virtual void MergePiecesOff()
	{
		vtkSMPContourGrid_MergePiecesOff_06(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkSMPContourGrid_MergePiecesOn_07(HandleRef pThis);

	/// <summary>
	/// If MergePieces is true (default), this filter will merge all
	/// pieces generated by processing the input with multiple threads.
	/// The output will be a vtkPolyData. Note that this has a slight overhead
	/// which becomes more significant as the number of threads used grows.
	/// If MergePieces is false, this filter will generate a vtkMultiBlock
	/// of vtkPolyData where the number of pieces will be equal to the number
	/// of threads used.
	/// </summary>
	public virtual void MergePiecesOn()
	{
		vtkSMPContourGrid_MergePiecesOn_07(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkSMPContourGrid_NewInstance_09(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new vtkSMPContourGrid NewInstance()
	{
		vtkSMPContourGrid result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkSMPContourGrid_NewInstance_09(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkSMPContourGrid)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkSMPContourGrid_SafeDownCast_10(HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static vtkSMPContourGrid SafeDownCast(vtkObjectBase o)
	{
		vtkSMPContourGrid vtkSMPContourGrid2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkSMPContourGrid_SafeDownCast_10(o?.GetCppThis() ?? default(HandleRef), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkSMPContourGrid2 = (vtkSMPContourGrid)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkSMPContourGrid2.Register(null);
			}
		}
		return vtkSMPContourGrid2;
	}

	[DllImport("Kitware.VTK.FiltersSMP.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkSMPContourGrid_SetMergePieces_11(HandleRef pThis, byte _arg);

	/// <summary>
	/// If MergePieces is true (default), this filter will merge all
	/// pieces generated by processing the input with multiple threads.
	/// The output will be a vtkPolyData. Note that this has a slight overhead
	/// which becomes more significant as the number of threads used grows.
	/// If MergePieces is false, this filter will generate a vtkMultiBlock
	/// of vtkPolyData where the number of pieces will be equal to the number
	/// of threads used.
	/// </summary>
	public virtual void SetMergePieces(bool _arg)
	{
		vtkSMPContourGrid_SetMergePieces_11(GetCppThis(), (byte)(_arg ? 1u : 0u));
	}
}
